package sdfi.lee.Entity;

import java.sql.Date;

import sdfi.lee.DAO.EmailDAO;

public class Email {
	private String relayTo;
	private String content;
	private String replayName;
	private Integer status,id;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	private Date senddate;
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Date getSenddate() {
		return senddate;
	}
	public void setSenddate(Date senddate) {
		this.senddate = senddate;
	}
	public String getRelayTo() {
		return relayTo;
	}
	public void setRelayTo(String relayTo) {
		this.relayTo = relayTo;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getReplayName() {
		return replayName;
	}
	public void setReplayName(String replayName) {
		this.replayName = replayName;
	}
	String tip="";
	public String getTip() {
		return tip;
	}
	public void setTip(String tip) {
		this.tip = tip;
	}
	public String execute()
	{
		try
		{
			new EmailDAO().send(this);
			tip="留言成功！";
		}
		catch(Exception ee)
		{
			ee.printStackTrace();
			tip="留言失败请稍后继续";
			return "error";
		}
		return "success";
	}
}
